text: Constify field of GtkTextLineSegmentClass
authorEmmanuele Bassi <ebassi@gnome.org>
Sat, 15 Oct 2016 20:33:11 +0000 (21:33 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 17 Oct 2016 10:44:11 +0000 (11:44 +0100)
We only use it internally for statically allocated structures, with
static strings, so there's no reason for it to be a `char*`.

gtk/gtktextsegment.h

index 5621bdee847abaf7742e3f8ce9e4918d69f4ad2a..4ea125f7c94cdce31cc0fcf9fcc0aa1162871f32 100644 (file)
@@ -94,7 +94,7 @@ typedef void                (*GtkTextSegCheckFunc)      (GtkTextLineSegment *seg
                                                          GtkTextLine        *line);
 
 struct _GtkTextLineSegmentClass {
-  char *name;                           /* Name of this kind of segment. */
+  const char *name;                     /* Name of this kind of segment. */
   gboolean leftGravity;                 /* If a segment has zero size (e.g. a
                                          * mark or tag toggle), does it
                                          * attach to character to its left